<include file="__PUBLIC__/_header" />
<div class="navbar navbar-default" id="navbar">
    <script type="text/javascript">
        try{
            ace.settings.check('navbar' , 'fixed')}catch(e){

        }
    </script>
    <include file="__PUBLIC__/_header_title"/>
    <!-- /.container -->
</div>
<div class="main-container" id="main-container">
    <script type="text/javascript">
        try{
            ace.settings.check('main-container' , 'fixed')}catch(e){
        }
        var machine_no_arr = "{$menu_list.machine_no}";
    </script>
    <div class="main-container-inner">
        <a class="menu-toggler" id="menu-toggler" href="#"> <span class="menu-text"></span> </a>
        <div class="sidebar" id="sidebar">
            <script type="text/javascript">
                try{ace.settings.check('sidebar' , 'fixed')}catch(e){

                }
            </script>
            <include file="__PUBLIC__/_nav" />
            <!-- /.nav-list -->
            <div class="sidebar-collapse" id="sidebar-collapse">
                <i class="icon-double-angle-left" data-icon1="icon-double-angle-left" data-icon2="icon-double-angle-right"></i>
            </div>
            <script type="text/javascript">
                try{
                    ace.settings.check('sidebar' , 'collapsed')}catch(e){
                }
            </script>
        </div>
        <div class="main-content">
            <div class="breadcrumbs" id="breadcrumbs">
                <script type="text/javascript">
                    try{
                        ace.settings.check('breadcrumbs' , 'fixed')
                    }catch(e){
                    }
                </script>
                <ul class="breadcrumb">
                    <li> <i class="icon-home home-icon"></i> <a href="{:Controller::_createUrl('index/index')}">首页</a></li>
                    <li class="active">商品中心</li>
                    <li class="active">商品详情</li>
                </ul>
                <!-- .breadcrumb -->
            </div>
            <div class="page-content">
                <div class="page-header">
                    <h1> 商品中心 <small> <i class="icon-double-angle-right"></i> 商品详情 </small> </h1>
                </div>
                <!-- /.page-header -->
                <div class="row">
                    <div class="col-xs-12">
                        <!-- PAGE CONTENT BEGINS -->
                        <div class="row">
                            <div class="col-xs-12">
                                <input type="hidden" name="m_id" id="m_id">
                                <form id="addData" class="form-horizontal" role="form" name="edit-form" >
                                    <div id="del_attch"></div>
                                    <table class="table table-bordered table-hover definewidth m10 " style="width: 100%;margin: 10px;">
                                        <caption style="text-align: left">基本参数<b class="arrow icon-angle-down"></b></caption>
                                        <tbody>
                                        <tr>
                                            <th class="col-xs-2 col-sm-1">商品名称</th>
                                            <td colspan="3">{$menu_list.m_name} </td>
                                        </tr>
                                        <tr>
                                            <th>商品条码</th>
                                            <td colspan="3">{$menu_list.bar_code}</td>
                                        </tr>
                                        <tr>
                                            <th>商品关键字</th>
                                            <td colspan="3">{$menu_list.m_keyword}</td>
                                        </tr>
                                        <tr>
                                            <th>所属品牌</th>
                                            <td colspan="3">
                                                {$brand_info.brand_name}
                                            </td>
                                        </tr>
                                        <tr>
                                            <th>适配机型</th>
                                            <td colspan="3">
                                                {$menu_list.machine_no}
                                            </td>
                                        </tr>
                                        <tr style="display: none">
                                            <th>供应商</th>
                                            <td colspan="3">
                                                <input type="hidden" name="m_supplier" value="{:LoginHelper::getUserId()}">
                                            </td>
                                        </tr>
                                        <tr>
                                            <th> 商品分类</th>
                                            <td colspan="3">
                                               {$product_info.kind_name}
                                            </td>
                                        </tr>
                                        <tr>
                                            <th>商品标签</th>
                                            <td colspan="3">
                                                <if condition="$menu_list.m_tag  eq 0">
                                                    普通商品
                                                    <elseif condition="$menu_list.m_tag  eq 1"/>
                                                    <span style="float: left;">特惠商品</span>
                                                    <div class="col-sm-10" id="stockchange">
                                                        <ul class="breadcrumb" >
                                                            <ol style="height: 32px;">
                                                                <div style="width: 150px;height: 20px;float: left">
                                                                    最迟配送时间
                                                                </div>
                                                                <input type="text" class="col-sm-6"  disabled name="m_deliver_limit_time" value="{$menu_list.m_deliver_limit_time}" />
                                                            </ol>
                                                            <ol style="height: 32px;">
                                                                <div style="width: 150px;height: 20px;float: left">
                                                                    促销数量
                                                                </div>
                                                                <input class="col-sm-6" disabled type="text" name="m_stock" value="{$menu_list.m_stock}" />
                                                            </ol>
                                                            <ol style="height: 32px;">
                                                                <div id="purchasenumchange">
                                                                    <div style="width: 150px;height: 20px;float: left">
                                                                        最小限购数量
                                                                    </div>
                                                                    <input class="col-sm-6" disabled type="text" name="limit_purchase_num" value="{$menu_list.limit_purchase_num}" />
                                                                </div>
                                                            </ol>
                                                        </ul>
                                                    </div>
                                                    <elseif condition="$menu_list.m_tag  eq 2"/>
                                                    团购商品
                                                    <elseif condition="$menu_list.m_tag  eq 3"/>
                                                    新机特惠
                                                    <elseif condition="$menu_list.m_tag  eq 4"/>
                                                    配件特惠
                                                    <else/>
                                                </if>

                                            </td>
                                        </tr>
                                        <tr>
                                            <th>商品描述</th>
                                            <td>{$htmls.desc_html}</td>
                                            <th>商品详情</th>
                                            <td>{$htmls.content_html}</td>
                                        </tr>
                                        <tr>
                                            <th>商品价格</th>
                                            <td colspan="3">市场价格<input type="text" disabled style="margin-left: 6px;" name="m_usual_price" value="{$menu_list.m_usual_price}" />
                                                <span class="col-sm-offset-1">零售价<input  disabled style="margin-left: 6px;" type="text" name="m_price" value="{$menu_list.m_price}" /> </span>
                                            </td>
                                        </tr>
                                        <tr>
                                            <th>规格描述</th>
                                            <td colspan="3">{$menu_list.tag_name}</td>
                                        </tr>
                                        <tr>
                                            <th width="6%">商品规格</th>
                                            <td colspan="3">
                                                    {$spec_info.spec_name}
                                            </td>
                                        </tr>

                                        </tbody>
                                    </table>
                                    <table class="table table-bordered table-hover definewidth m10 " style="width: 100%;margin: 10px;">
                                        <caption style="text-align: left">附件 <b class="arrow icon-angle-down"></b></caption>
                                        <tr>
                                            <th class="col-xs-2 col-sm-1">图片详情</th>
                                            <td >
                                                <volist name="attch_list" id="vo">
                                                    <div style='max-width:200px;height:140px;float: left;text-align: center'>
                                                        <img class='preview-upload-pic' style='height:110px;max-width:160px;' src="{:Controller::getConfig('file_server_url')}/2013/{$vo.file_name}"/>&nbsp;
                                                    </div>
                                                </volist>
                                            </td>
                                        </tr>
                                    </table>
                                    <!-- 修改 -->
                                </form>
                                <form class="form-horizontal"   style="display: block" name="t_26_merchandise_attradministrator">
                                    <table class="table table-bordered table-hover definewidth m10 " style="width: 100%;margin: 10px;">
                                        <caption style="text-align: left">扩展参数 <b class="arrow icon-angle-up"></b></caption>
                                        <tbody>
                                        <tr>
                                            <th class="col-xs-2 col-sm-1">工作质量</th>
                                            <td>
                                              {$attr_list.attr1}
                                            </td>
                                            <th >标准斗容</th>
                                            <td>
                                                {$attr_list.attr2}
                                            </td>
                                        </tr>
                                        <tr>
                                            <th >理论油耗</th>
                                            <td>
                                              {$attr_list.attr3}
                                            </td>
                                            <th >代理商</th>
                                            <td>
                                             {$attr_list.attr4}
                                            </td>
                                        </tr>
                                        <tr>
                                            <th >发动机品牌/型号</th>
                                            <td>
                                               {$attr_list.attr6}
                                            </td>
                                            <th >主泵型号</th>
                                            <td>
                                              {$attr_list.attr7}
                                            </td>
                                        </tr>
                                        <tr>
                                            <th >主阀型号</th>
                                            <td>
                                                {$attr_list.attr8}
                                            </td>
                                            <th >行走马达型号</th>
                                            <td>
                                               {$attr_list.attr9}
                                            </td>
                                        </tr>
                                        <tr>
                                            <th >回转马达型号</th>
                                            <td>
                                               {$attr_list.attr10}
                                            </td>
                                            <th >整机产地</th>
                                            <td>
                                               {$attr_list.attr11}
                                            </td>
                                        </tr>
                                        <tr>
                                            <th >视频</th>
                                            <td>
                                                {$attr_list.m_video_url}
                                            </td>
                                            <th >说明书</th>
                                            <td>
                                               {$attr_list.m_instructions_url}
                                            </td>
                                        </tr>
                                        <tr >
                                            <th >优惠政策</th>
                                            <td colspan="3">
                                               {$attr_list.m_preferential_policy}
                                            </td>
                                        </tr>
                                        <tr>
                                            <th >预售规则</th>
                                            <td>
                                                {$htmls.rules_html}
                                            </td>
                                            <th >产品特性</th>
                                            <td>
                                                {$htmls.special_html}
                                            </td>
                                        </tr>

                                        <tr>
                                            <th >多功能辅件</th>
                                            <td>
                                                {$htmls.part_html}
                                            </td>

                                            <th >性能参数</th>
                                            <td>

                                                {$htmls.url1_html}
                                            </td>
                                        </tr>
                                        <tr>
                                            <th >图片链接</th>
                                            <td>

                                                {$htmls.url2_html}

                                            </td>

                                            <th >视频链接</th>
                                            <td>

                                                {$htmls.url3_html}

                                            </td>
                                        </tr>
                                        <tr>
                                            <th >口碑链接</th>
                                            <td>
                                                {$htmls.url4_html}
                                            </td>
                                        </tr>
                                        </tbody>
                                    </table>
                                </form>
                            </div>
                            <!-- /span -->
                        </div>
                        <!-- /row -->
                    </div>
                    <!-- PAGE CONTENT ENDS -->
                </div>
                <!-- /.row -->
            </div>

        </div>
    </div>
</div>


<script src="__APP_SKIN__js/jquery-2.0.3.min.js"></script>
<script src="__APP_SKIN__js/bootstrap.min.js"></script>


<input type="hidden" id="texthidden" value='{$menu_list.m_desc}'>
<input type="hidden" id="contenthidden" value='{$menu_list.content}'>


<input type="hidden" id="hidden_pre_sale_rules" value='{$attr_list.pre_sale_rules}'>
<input type="hidden" id="hidden_m_special_desc" value='{$attr_list.m_special_desc}'>
<input type="hidden" id="hidden_m_multifunctional_auxiliary_part" value='{$attr_list.m_multifunctional_auxiliary_part}'>
<input type="hidden" id="hidden_url1" value='{$attr_list.url1}'>
<input type="hidden" id="hidden_url2" value='{$attr_list.url2}'>
<input type="hidden" id="hidden_url3" value='{$attr_list.url3}'>
<input type="hidden" id="hidden_url4" value='{$attr_list.url4}'>
<script>
    $(function(){
        encodeURIComponent(editor_desc.html($("#texthidden").val()));
        encodeURIComponent(editor_content.html($("#contenthidden").val()));

        encodeURIComponent(editor_pre_sale_rules.html($("#hidden_pre_sale_rules").val()));
        encodeURIComponent(editor_m_special_desc.html($("#hidden_m_special_desc").val()));
        encodeURIComponent(editor_m_multifunctional_auxiliary_part.html($("#hidden_m_multifunctional_auxiliary_part").val()));

        encodeURIComponent(editor_url1.html($("#hidden_url1").val()));
        encodeURIComponent(editor_url2.html($("#hidden_url2").val()));
        encodeURIComponent(editor_url3.html($("#hidden_url3").val()));
        encodeURIComponent(editor_url4.html($("#hidden_url4").val()));
        $("caption").eq(2).siblings().hide();
        $("caption").click(function(){
            $(this).siblings().toggle();
            var that=$(this).children('b');
            if(that.hasClass("icon-angle-down")){
                that.addClass("icon-angle-up");
                that.removeClass("icon-angle-down");
            }else{
                that.addClass("icon-angle-down");
                that.removeClass("icon-angle-up");
            }
        });
    })
</script>

</body>
</html>